package cc.realxyq.springboot.actuator.health;

import org.springframework.boot.actuate.health.AbstractHealthIndicator;
import org.springframework.boot.actuate.health.Health;
import org.springframework.stereotype.Component;

import java.util.Collections;

/**
 * @author : [buleing]
 * @version : [v1.0]
 * @description : [一句话描述该类的功能]
 * @createTime : [2021/6/10 18:15]
 * @updateUser : [buleing]
 * @updateTime : [2021/6/10 18:15]
 * @updateRemark : [说明本次修改内容]
 */
@Component
public class MyHealthIndicator extends AbstractHealthIndicator {

    @Override
    protected void doHealthCheck(Health.Builder builder) throws Exception {

        //这里可以构建自己想要的health信息！
        builder.withDetail("example", Collections.singletonMap("key", "value"));
    }
}
